/*
 * @Author: yanjikun
 * @Date: 2022-02-17 16:45:01
 * @LastEditors: yanjikun
 * @LastEditTime: 2022-03-25 10:49:49
 * @Description: file content
 */
import { PropType } from 'vue'
import { ButtonProps } from 'ant-design-vue/es/button/buttonTypes'
import { ExtractPropTypes } from 'vue'
import { ColEx } from '.'

export type ButtonOptions = Partial<ButtonProps> & { text: string }
export const formActionProps = {
  showActionButtonGroup: {
    type: Boolean as PropType<boolean>,
    default: true
  },
  showResetButton: {
    type: Boolean as PropType<boolean>,
    default: false
  },
  showSubmitButton: {
    type: Boolean as PropType<boolean>,
    default: true
  },
  showAdvancedButton: {
    type: Boolean as PropType<boolean>,
    default: false
  },
  resetButtonOptions: {
    type: Object as PropType<ButtonOptions>,
    default: () => ({})
  },
  submitButtonOptions: {
    type: Object as PropType<ButtonOptions>,
    default: () => ({})
  },
  actionColOptions: {
    type: Object as PropType<Partial<ColEx>>,
    default: () => ({})
  },
  actionSpan: {
    type: Number as PropType<number>,
    default: 6
  },
  isAdvanced: {
    type: Boolean as PropType<boolean>,
    default: false
  }
}
export type formActionPropsType = Partial<ExtractPropTypes<typeof formActionProps>>
